const fs = require('fs')

//读取
function readOne () {
    return new Promise((resolve,reject)=>{
        fs.readFile('./28_模块化.html',(err,data)=>{
            if(err) reject(err)
            resolve(data)
        })
    })
    
}

function readTwo () {
    return new Promise((resolve,reject)=>{
        fs.readFile('./28_模块化.html',(err,data)=>{
            if(err) reject(err)
            resolve(data)
        })
    })
    
}

function readThree () {
    return new Promise((resolve,reject)=>{
        fs.readFile('./28_模块化.html',(err,data)=>{
            if(err) reject(err)
            resolve(data)
        })
    })
    
}

//声明一个async函数
async function main () {
    let res1 = await readOne()
    let res2 = await readTwo()
    let res3 = await readThree()
    console.log(res1.toString())
    console.log(res2.toString())
    console.log(res3.toString())
}

main()

